# -*- coding: utf-8 -*-
"""
Created on 2018/11/1

@author: gaoan
"""
from enum import Enum


class RequestType(Enum):
    # 交易
    ORDER_NO = 1
    PREVIEW_ORDER = 2
    PLACE_ORDER = 3
    CANCEL_ORDER = 4
    MODIFY_ORDER = 5
    REQ_OPEN_ORDERS = 6
    REQ_ASSETS = 7
    REQ_POSITIONS = 8
    REQ_ACCOUNT = 9

    # 行情
    REQ_MARKET_STATE = 101
    REQ_ALL_SYMBOLS = 102
    REQ_ALL_SYMBOL_NAMES = 103
    REQ_BRIEF_INFO = 104
    REQ_STOCK_DETAIL = 105
    REQ_TIME_LINE = 106
    REQ_HOUR_TRADING_TIME_LINE = 107
    REQ_KLINE = 108
    REQ_TRADE_TICK = 109
    REQ_SUB_SYMBOLS = 110


class ResponseType(Enum):
    # 交易
    GET_ORDER_NO_END = 1
    PREVIEW_ORDER_END = 2
    PLACE_ORDER_END = 3
    CANCEL_ORDER_END = 4
    MODIFY_ORDER_END = 5
    GET_ASSET_END = 6
    GET_POSITION_END = 7
    GET_ACCOUNT_END = 8
    SUBSCRIBE_ORDER_STATUS = 9
    SUBSCRIBE_POSITION = 10
    SUBSCRIBE_ASSET = 11
    SUBSCRIBE_TRADE_EXECUTION = 12

    # 行情
    GET_MARKET_STATE_END = 101
    GET_ALL_SYMBOLS_END = 102
    GET_ALL_SYMBOL_NAMES_END = 103
    GET_BRIEF_INFO_END = 104
    GET_STOCK_DETAIL_END = 105
    GET_TIME_LINE_END = 106
    GET_HOUR_TRADING_TIME_LINE_END = 107
    GET_KLINE_END = 108
    GET_TRADING_TICK_END = 109
    GET_QUOTE_CHANGE_END = 110

    GET_SUB_SYMBOLS_END = 111
    GET_SUBSCRIBE_END = 112
    GET_CANCEL_SUBSCRIBE_END = 113

    ERROR_END = 200
